import request from "@/utils/request";
import pyRequest from "@/utils/pyrequest";

// 插值
export function interWell(wellId, space = undefined, isAddPoint = false) {
    return pyRequest({
        url: "/v3/" + wellId + "/interpolation",
        method: "get",
        params: {
            // id: fileId,
            // bucketName: bucketName,
            // objectName: objectName,
            wellId: wellId,
            // order: "DESC",
            pageNum: 1,
            pageSize: 99999,
            // sortBy: "id",
            space: space,
            is_slanting_point: isAddPoint
        },
    });
}
export function infoWell(fileId) {
    return pyRequest({
        url: "/completion",
        method: "get",
        params: {
            id: fileId,
            order: "DESC",
            pageNum: 1,
            pageSize: 99999,
            sortBy: "id",
        },
    });
}
export function delSurvey(wellId) {
    return pyRequest({
        url: "/v3/" + wellId + "/data",
        method: "delete",
    });
}

// 绘制角度图
export function drawAngle(data) {
    return pyRequest({
        url: "/v3/angle/draw",
        method: "post",
        data: data,
    });
}
export function getAngle(data) {
    return pyRequest({
        url: "/v3/angle/data",
        method: "post",
        data: data,
    });
}

// 轴力图v2绘制
export function drawAxial(data) {
    return pyRequest({
        url: "/v3/axial/draw",
        method: "post",
        data: data,
    });
}
export function getAxial(data) {
    return pyRequest({
        url: "/v3/axial/data",
        method: "post",
        data: data,
    });
}

// 绘制拉力图
export function drawTension(data) {
    return pyRequest({
        url: "/v3/tension/draw",
        method: "post",
        data: data,
    });
}
export function getTension(data) {
    return pyRequest({
        url: "/v3/tension/data",
        method: "post",
        data: data,
    });
}

// 绘制接触力图
export function drawTouch(data) {
    return pyRequest({
        url: "/v3/touch/draw",
        method: "post",
        data: data,
    });
}
export function getTouch(data) {
    return pyRequest({
        url: "/v3/touch/data",
        method: "post",
        data: data,
    });
}
//通过性分析
export function geometryPass(data) {
    return pyRequest({
        url: "/v3/geometry/passcheck",
        method: "post",
        data: data,
    });
}
export function mechanicsPass(data) {
    return pyRequest({
        url: "/v3/mechanics/passcheck",
        method: "post",
        data: data,
    });
}
// 绘制电缆图
export function drawCable(data) {
    return pyRequest({
        url: "/v3/cable/draw",
        method: "post",
        data: data,
    });
}
export function getCable(data) {
    return pyRequest({
        url: "/v3/cable/data",
        method: "post",
        data: data,
    });
}

// 形变量
export function getStrain(data) {
    return pyRequest({
        url: "/v3/strain/data",
        method: "post",
        data: data,
    });
}
export function drawStrain(data) {
    return pyRequest({
        url: "/v3/strain/draw",
        method: "post",
        data: data,
    });
}
// 下入深度
export function concludDepth(data) {
    return pyRequest({
        url: "/v3/descent/data",
        method: "post",
        data: data,
    });
}
// 弱点
export function concludWeak(data) {
    return pyRequest({
        url: "/v3/weak/conclusion",
        method: "post",
        data: data,
    });
}
// 仪器串
export function concludCombinat(data) {
    return pyRequest({
        url: "/v3/combination/conclusion",
        method: "post",
        data: data,
    });
}

export function getDescent(data) {
    return pyRequest({
        url: "/v3/descent/conclusion",
        method: "post",
        data: data,
    });
}
// 井壁稳定性(数据)
export function getStability(data) {
    return pyRequest({
        url: "/v3/stability/data",
        method: "post",
        data: data,
    })
}
// 井壁稳定性(结论)
export function concludStability(data) {
    return pyRequest({
        url: "/v3/stability/conclusion",
        method: "post",
        data: data,
    })
}
// 安全缆头张力
export function getSafeData(data) {
    return pyRequest({
        url: "v3/safe/data",
        method: "post",
        data: data,
    })
}

export default {
    interWell,
    infoWell,
    delSurvey,
    drawAngle,
    getAngle,
    drawAxial,
    getAxial,
    drawTension,
    getTension,
    drawTouch,
    getTouch,
    geometryPass,
    mechanicsPass,
    drawCable,
    getCable,
    getStrain,
    drawStrain,
    concludDepth,
    concludWeak,
    concludCombinat,
    getDescent,
    getStability,
    concludStability,
    getSafeData
} 
